clc;

a = 0.3; %radius

L = 1.0;

c = 8.0*pi*a*a*a/3/L/L/L;

poro = 1.0 - c;

cmax = sqrt(3.0)*pi/8;

% cmax = pi/6;

kai = (c/cmax)^(1.0/3);

q = [0.1, 0.1575834, 0.2483254, 0.3233022, 0.4022864, 0.4650320, 0.5281412, 0.586374, 0.6258376, 0.6544504, 0.6878396,...
     0.7190839, 0.7268068, 0.7304025, 0.7301217, 0.7236410, 0.7298014, 0.7369849, 0.7109497, 0.6228418, 0.5235796, 0.4476874, 0.3541982, 0.2939353, ...
     0.3935484, 0.5179097, 0.3959872, 0.2227627, 0.3393390, 0.4491369, 0.2200686];
 
 q = 10.0*q;
 
 len = length(q);
 
 Ds = 0.0;
 
 for i = 1 : len;
     
     Ds = Ds + q(i)*kai^(i-1);
     
 end
 
 d = 2.0*a;
 
 K = L*L*L/6/pi/d/Ds